import request from '@/utils/request'

// 查询用电信息列表
export function listUsage(query) {
  return request({
    url: '/ZdElectricityUsage/usage/list',
    method: 'get',
    params: query
  })
}

// 查询用电信息详细
export function getUsage(orderNumber) {
  return request({
    url: '/ZdElectricityUsage/usage/' + orderNumber,
    method: 'get'
  })
}

// 新增用电信息
export function addUsage(data) {
  return request({
    url: '/ZdElectricityUsage/usage',
    method: 'post',
    data: data
  })
}

// 修改用电信息
export function updateUsage(data) {
  return request({
    url: '/ZdElectricityUsage/usage',
    method: 'put',
    data: data
  })
}

// 删除用电信息
export function delUsage(orderNumber) {
  return request({
    url: '/ZdElectricityUsage/usage/' + orderNumber,
    method: 'delete'
  })
}
